using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Content;
using Xfinity.Rendering;

namespace Xfinity.Landscape
{
    public class Terrain : DrawableGameComponent
    {
        private Texture2D heightMap;
        private string name;
        private Grid grid;
        private Effect displacementEffect;
        private ContentManager content;
        public Terrain(Game game):base(game)
        {
            content = new ContentManager(game.Services);
            grid = new Grid(game);
        }
        public override void Initialize()
        {
            base.Initialize();
        }
        protected override void LoadGraphicsContent(bool loadAllContent)
        {
            if (loadAllContent)
            {
                displacementEffect= content.Load<Effect>(@"Content\Effects\TerrainDisplacement");
            }
            grid.LoadGraphics(loadAllContent);
            base.LoadGraphicsContent(loadAllContent);
        }
        public override void Draw(GameTime gameTime)
        {

            base.Draw(gameTime);
        }
    }
}
